perm filename MIXPLA.BIL[UP,DOC]1 blob sn#421520 filedate 1979-02-28 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00004 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	MIXPLA
C00004 00003	MIXPLA should be almost self-explanatory.  If no extension is given in the
C00008 00004	If "INSERT" occurs at any point followed by a file name, MIXPLA will  open
C00012 ENDMK
C⊗;
MIXPLA
	
is a PLAY file mixing program with the following capabilities:
	
1. Can take up to 15 simultaneous input files.
2. Accepts TTY input.
3. Has no limits on input or output file sizes.
4. Can handle correctly almost any PLAY file that MBOX or NEWMUS can understand.
   (and some they won't too).
   a. Throws away directory pages.
   b. passes on to output file directly anything like PRINT...,COMMENT...,
   < ... ,P24←4; etc. (see below)
   c. Knows how to handle DONT_SCAN, SCAN, multiple PLAY statements, and INSERT
   at all levels (TTY or file);
   (also PASS←0;).
5. can read or write onto UDP.
6. will read and retain lower case (in most cases).
7. Is not confused by arbitrary data formats (tabs,spaces,crlfs,form feeds etc.)
8. can parse expressions in P1 and P2 (of any depth of parenthesis nesting).
9. is small and fast (24 pages core, faster than MIXSCR).
10. will check for duplicate calls on reverb and ask if the user wants them kept.
11. will attempt to produce a reasonable header.
MIXPLA should be almost self-explanatory.  If no extension is given in the
response to "File # → " MIXPLA will look for a file with that name and  an
extension "PLA", "SCR", "HED",  or "BOX" (in  that order).  Output  file's
default extension is "PLA".
	
"Begin Time", if specified, will be added to all begin times in the file.

If the user responds "TTY:"  or "tty:" etc (upper  and lower case are  not
problematical), then MIXPLA sets up a channel into the mix for the user to
type information to  directly.  Input is  terminated by ";".   It will  be
treated exactly like file input (anything you  can say in a file, you  can
say here).  To terminate TTY input, type just ";" or "FINISH;".
	
If PASS←0 or PLAY is encountered during a play file, all subsequent  begin
times become begin time + maximum note duration before the PLAY  statement
(as is to  be expected.)  PASS←anything  else will be  handled exactly  as
though the user had said PASS←0;
	
Any section of a play file between the statement "DONT_SCAN;" and  "SCAN;"
will be omitted from the output play file.  Only works in the play section
(not header).
	
MIXPLA thinks something is an instrument call if it is of the form:

   Name Separaters Number (or expression) Separaters Number

where NAME is any legal SAIL identifier (of any length).

      SEPARATERS is any combination of any number of the following characters:
	Space, Form Feed, Carraige Return, Line Feed, Tab, Comma (1)
      NUMBER is any legal expression involving parentheses, +,-,*,/,↑.
	
MIXPLA thinks a file is of the form:
    HEADER
    "PLAY;"
    DATA
where the header part  is optional (as  is the PLAY  if the file  contains
only header information.   If there is  no PLAY, the  entire file will  be
assumed to be header information.)

The comment character "<" is a special case, in that it signals a  comment
that can end either with a ";" or with crlf.  (SCORE assumes the latter).
	
If "INSERT" occurs at any point followed by a file name, MIXPLA will  open
a channel to it (if possible), just as though it had been specified at the
start.  If the  insert takes place  after a "PLAY"  statement, all  header
information will be discarded  and the first begin  time will reflect  the
begin time  where it  was inserted  (as  though there  was an  extra  PLAY
statement -- it a file containing:

	PLAY;
	Simp 0 2;
	FINISH;

is inserted at time 25 in some other file, SIMP 25 2; will be the  result.
INSERTED files may call other INSERT themselves.  (This allows one to  use
MIXPLA to butt files end to end easily.)  Partial file name  specification
is ok,  or reading  inserted files  from UDP  etc.  Clever  use of  INSERT
should allow one to handle any number of input files in one run of  MIXPLA
(when a file has been completely read by MIXPLA, it releases its  channel,
thus freeing it  up for  an INSERTED file  elsewhere.)  N.B.  this is  not
identical to MBOX's INSERT,  wherein the calling  file is suspended  until
the end of the inserted file.

To find out  what MIXPLA  is doing  type "DEBUGME"  as a  response to  the
request for input file.  (Basically it  sets up a circular, doubly  linked
list of all input ports (files  and tty: channels), circles through  these
looking for various things,  cutting out of the  circle any port that  has
been fully read  in, thus  assuring maximal  efficiency.  "COUNTER"  gives
internal loop counts, "STATEME" tells about statement handling,  "OPERATI"
tells about internal machinery.  ("DEBUGME" gives all three).
	
Begin Times  and  Durations  (P1  and P2  may  be  expressions,  involving
parentheses, *,-,↑,+, and /.  There is no limit on the nesting depth  (but
compute time goes up).
	
Multiple calls on any instrument with  the first three letters REV in  its
name will cause MIXPLA to ask if the user wants these deleted -- if "Y" is
the response, any  instrument call  that begins REV  (REVRB, REVERB  etc.)
will be thrown away, after the first instance.
	
In producing the mix output's header, MIXPLA sends only the first instance
of a setting  of NPTIX, NUTIX,  SRATE, or OUTPUT.   If it finds  identical
calls on FUNCS or RECORD, the second  is thrown away.  Note also that a  a
comment in the header section introduced by "COMMENT" will be tossed  out.
If you want it to stay, use "∂" (with a semi-colon at the end).